package com.example.hangzhou.welbeing.mytestdemoapp.designPatterns.StrategyModel;

import com.example.hangzhou.welbeing.mytestdemoapp.designPatterns.StrategyModel.model.Context;
import com.example.hangzhou.welbeing.mytestdemoapp.designPatterns.StrategyModel.model.OperationAdd;
import com.example.hangzhou.welbeing.mytestdemoapp.designPatterns.StrategyModel.model.OperationMultiply;
import com.example.hangzhou.welbeing.mytestdemoapp.designPatterns.StrategyModel.model.OperationSubstract;

/**
 * 杭州惟君医疗科技有限公司16
 * Created by 20433 on 2018/5/18
 *
 * @desc 东风山河绿，春已不折柳，繁花看不尽，处处惹人留
 * @desc 佛祖镇楼，bug辟容易
 */

public class StrategyPatternDemo {
    public static void main(String[] args){
        Context context = new Context(new OperationAdd());
        context.executeStrategy(2,3);

        Context context_01 = new Context(new OperationMultiply());
        context_01.executeStrategy(2,3);
        Context context_02 = new Context(new OperationSubstract());
        context_02.executeStrategy(2,3);
    }
}
